//
//  XiaoShouEFanDianListCell.m
//  FactorySale
//
//  Created by 李 on 2020/1/13.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "XiaoShouEFanDianListCell.h"

@implementation XiaoShouEFanDianListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        
        UILabel *dateLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, KWIDTH/5, 42.5)];
        dateLab.text = @"";
        dateLab.font =  KFontPingFangSCMedium(12);
        dateLab.textAlignment = NSTextAlignmentCenter;
        dateLab.textColor = [UIColor colorWithHexString:@"#31CEA9"];
        dateLab.numberOfLines = 0;
        [self.contentView addSubview:dateLab];
        self.dateLab = dateLab;
        
        UILabel *secondLab = [[UILabel alloc] initWithFrame:CGRectMake(KWIDTH/5, 0, KWIDTH/5, 42.5)];
        secondLab.text = @"";
        secondLab.font = KFontPingFangSCMedium(12);
        secondLab.textAlignment = NSTextAlignmentLeft;
        secondLab.textColor = [UIColor colorWithHexString:@"#999999"];
        secondLab.numberOfLines = 0;
        [self.contentView addSubview:secondLab];
        self.secondLab = secondLab;
        
         UILabel *thirdLab = [[UILabel alloc] initWithFrame:CGRectMake(KWIDTH/5 *2, 0, KWIDTH/5, 42.5)];
               thirdLab.text = @"";
               thirdLab.font = KFontPingFangSCMedium(12);
               thirdLab.textAlignment = NSTextAlignmentLeft;
               thirdLab.textColor = [UIColor colorWithHexString:@"#999999"];
               thirdLab.numberOfLines = 0;
               [self.contentView addSubview:thirdLab];
        self.thirdLab = thirdLab;
               
        UILabel *fourthLab = [[UILabel alloc] initWithFrame:CGRectMake(KWIDTH/5*3, 0, KWIDTH/5, 42.5)];
               fourthLab.text = @"";
               fourthLab.font = KFontPingFangSCMedium(12);
               fourthLab.textAlignment = NSTextAlignmentLeft;
               fourthLab.textColor = [UIColor colorWithHexString:@"#999999"];
               fourthLab.numberOfLines = 0;
               [self.contentView addSubview:fourthLab];
        self.fourthLab = fourthLab;
        
        UILabel *fifthLab = [[UILabel alloc] initWithFrame:CGRectMake(KWIDTH/5*4, 0, KWIDTH/5-7, 42.5)];
               fifthLab.text = @"";
               fifthLab.font = KFontPingFangSCMedium(12);
               fifthLab.textAlignment = NSTextAlignmentLeft;
               fifthLab.textColor = [UIColor colorWithHexString:@"#999999"];
               fifthLab.numberOfLines = 0;
               [self.contentView addSubview:fifthLab];
        self.fifthLab = fifthLab;
        
        UIImageView *arrowImage = [[UIImageView alloc] init];
              arrowImage.frame = CGRectMake(KWIDTH-6, (42.5-10.5)/2, 5, 10.5);
              arrowImage.image = imgname(@"blackArrow");
             
              [self.contentView addSubview:arrowImage];
        
        UIView *line = [[UIView alloc] init];
                 line.backgroundColor = [UIColor colorWithHexString:@"#E5E5E5"];
                 line.frame = CGRectMake(0, 42.5, KWIDTH-15, 0.5);
                 [self.contentView addSubview:line];
        
    }
    return self;
}
-(void)setModel:(XiaoShouEFanDianListModel *)model
{
    _model = model;
    if (_model) {
        self.dateLab.text = [NSString stringWithFormat:@"%@",_model.billing_period];
        self.secondLab.text =[NSString stringWithFormat:@"%@元",_model.beginning_money] ;
        self.thirdLab.text = [NSString stringWithFormat:@"%@元",_model.min_money];
        self.fourthLab.text =[NSString stringWithFormat:@"%@元",_model.add_money] ;
        self.fifthLab.text = [NSString stringWithFormat:@"%@元",_model.end_money];
        
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
